package pl.nazaweb.imedproplus.rest.pojo;

import java.util.Date;
import pl.nazaweb.imedproplus.model.entity.Users;

public class UserPojo {

    public Long id;
    public String login;
    public String firstName;
    public String lastName;
    public Date createDate;
    public String email;

    public UserPojo() {
    }

    public UserPojo(Users user) {
        this.login = user.getLogin();
        this.firstName = user.getFirstName();
        this.lastName = user.getLastName();
        this.createDate = user.getCreateDate();
        this.email = user.getEmail();
        this.id = user.getId();
    }

    public Users getEntity() {
        Users user = new Users();
        user.setLogin(login);
        user.setFirstName(firstName);
        user.setLastName(lastName);
        user.setCreateDate(createDate);
        user.setEmail(email);
        user.setId(id);
        return user;
    }
}
